using System;
using System.IO;
using System.Collections.Generic;
using System.Text;

namespace MyMedia.iPod.Music
{
	public class PlaylistList : Node
	{
		Mhlp m_mhlp;

		protected override int Size
		{
			get { return 0; /* m_mhlp.HeaderLength;*/ }
		}

		protected override void ReadImpl(BinaryReader reader)
		{
			m_mhlp = new Mhlp();
			m_mhlp.Read(reader);

			for (int i = 0; i < m_mhlp.PlaylistCount; i++)
			{
				Playlist playlist = new Playlist();
				AddChild(playlist);
				playlist.Read(reader);
			}
		}

		protected override void WriteImpl(BinaryWriter writer)
		{
			m_mhlp.Write(writer);
		}

		protected override void SetSize(int size) {}
	}
}
